package com.ssm.admin.controller;


import com.ssm.admin.dao.SsmGoodsDao;
import com.ssm.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;


@RestController
@RequestMapping("admin/echarts")
public class EchartsController {
    @Autowired
    private SsmGoodsDao ssmGoodsDao;
    @RequestMapping("/getgoods")
    public R getgoods() {

        ArrayList<Object> goodsMap = ssmGoodsDao.getGoodsMap();


        return R.ok().put("goodsList",goodsMap);
    }
    @RequestMapping("/getordernum")
    public R getordernum() {

       ArrayList<Object> orderMap = ssmGoodsDao.getorderMap();
        return R.ok().put("orderMap",orderMap);
    }
    @RequestMapping("/getsjnum")
    public R getsjnum() {

       ArrayList<Object> sjnumMap = ssmGoodsDao.getsjnumMap();


        return R.ok().put("sjnumMap",sjnumMap);
    }
    @RequestMapping("/getadtime")
    public R getadtime() {

        ArrayList<Object> adtimeMap = ssmGoodsDao.getadtimeMap();

        return R.ok().put("adtimeMap",adtimeMap);
    }
}
